// 
import {
	request
} from './request.js'
import {
	rsaPublicData
} from '@/pagesH5/utils/utils'

// 判断小程序是否绑定手机号
export const getAppletBinding = (data) => request('/oauth/applet/binding', {
	method: 'get',
	header: {
		'Content-Type': 'application/x-www-form-urlencoded'
	},
	data
})

export const getDynamicDetails = (data) => request('/circle/circle-dynamic/detail', {
	data,
	header: {
		plat: 4
	},
})

export const getDynamicComments = (data) => request('/circle/circle-dynamic/comments', {
	data
})
export const getDynamicBrowse = (data) => request('/circle/circle-dynamic/browse/page', {
	data
})
export const getDynamicLike = (data) => request('/circle/circle-dynamic/like/page', {
	data
})



export const circleDetail = (data) => request('/member/share/circle/detail', {
	data
})
export const commentReply = (data) => request('/circle/circle-dynamic/comment-reply', {
	method: 'post',
	data
})

export const addAttention = (data) => request('/member/add/attention', {
	method: 'post',
	data
})
export const manageAttention = (data) => request('/member/manage/attention', {
	method: 'post',
	data
})
export const addComment = (data) => request('/circle/circle-dynamic/add-comment', {
	method: 'post',
	data
})
export const circleUnlikeV2 = (data) => request('/circle/circle-dynamic/unlike/v2', {
	method: 'post',
	data
})
export const circleLikeV2 = (data) => request('/circle/circle-dynamic/like/v2', {
	method: 'post',
	data
})
export const commentUnlike = (data) => request('/circle/circle-dynamic/comment/unlike', {
	method: 'post',
	data
})
export const commentLike = (data) => request('/circle/circle-dynamic/comment/like', {
	method: 'post',
	data
})
// 企业水花 - 评论点赞
export const companyCommentLike = (data) => request('/sys/company/dynamic/commentLike', {
	method: 'post',
	header: {
		'Content-Type': 'application/x-www-form-urlencoded'
	},
	data
})

export const cardRequest = (data) => request('/member/card/request', {
	method: 'post',
	data
})
export const collectionCard = (data) => request('/member/collection/card', {
	method: 'post',
	data
})
export const collectioncCancel = (data) => request('/member/collection/cancel', {
	method: 'delete',
	data
})
export const memberChatGroup = (data) => request('/member/memberChatGroup/home/circle', {
	method: 'post',
	data
})

export const replyUnlike = (data) => request('/circle/circle-dynamic/reply-unlike', {
	method: 'post',
	data
})
export const replyLike = (data) => request('/circle/circle-dynamic/reply-like', {
	method: 'post',
	data
})


export const circleDynamic = (data) => request('/circle/share/dynamic/group', {
	data
})
export const circleReplies = (data) => request('/circle/circle-dynamic/replies', {
	data
})
export const delCircleReplies = (data) => request('/circle/circle-dynamic/comment-del', {
	method: 'delete',
	data
})
export const getSms = (data) => request('/notify/sms', {
	data
})
// 上传文件
export function fileUploadAnon(file) {
	// console.log(file)
	const formData = new FormData()
	formData.append('file', file)
	return request({
		url: `/oss/file-anon/upload`,
		headers: {
			'Content-Type': 'multipart/form-data'
		},
		method: 'post',
		data: formData
	})
}
export const leadRegister = (data) => request('/member/member-anon/leadRegister/add', {
	method: 'post',
	data
})

export const conferenceAddOrEdit = (data) => request('/recruit/app/conference/addOrEdit', {
	method: 'post',
	data
})
export const conferenceAddOrEditDirectSign = (data) => request('/recruit/app/conference/addOrEdit/directSign', {
	method: 'post',
	data
})
export const conferenceAddOrEditNoSign = (data) => request('/recruit/app/conference/addOrEdit/noSign', {
	method: 'post',
	data
})
export const groupAddOrEdit = (data) => request('/recruit/app/conference/groupAddOrEdit', {
	method: 'post',
	data
})
export const groupAddOrEditDirectSign = (data) => request('/recruit/app/conference/groupAddOrEdit/directSign', {
	method: 'post',
	data
})
export const groupAddOrEditNoSign = (data) => request('/recruit/app/conference/groupAddOrEdit/noSign', {
	method: 'post',
	data
})

export const getByMemberId = (data) => request('/member/member-anon/leadRegister/getByMemberId', {
	method: 'get',
	data
})
export const getCityDetails = (data) => request('/sys/share/city/detail', {
	method: 'get',
	data
})
export const geCooperationDetails = (data) => request('/recruit/share/detail', {
	method: 'get',
	data
})
export const questionnaireList = (data) => request('/market/app/market/questionnaire/subject/list', {
	method: 'get',
	data: {
		qtId: params.id
	},
	headers: {
		Authorization: 'Bearer ' + params.token
	}
})
export const questionnaireDetail = (data) => request('/market/app/market/questionnaire/questionnaire/info', {
	method: 'get',
	data: {
		qtId: params.id
	},
	headers: {
		Authorization: 'Bearer ' + params.token
	}
})
export const questionnaireSubmit = (data) => request('/market/app/market/questionnaire/answer', {
	method: 'post',
	data: data,
	headers: {
		Authorization: 'Bearer ' + data.token
	}
})
export const getCardDetails = (data) => request('/member/card/info', {
	method: 'get',
	data
})
export const getStyleList = () => request('/member/share/h5/datahuman/style', {})
export const getBusinessDetails = (data) => request('/sys/share/card/' + data.id, {
	method: 'get'
})
export const getDynamicBusinessDetails = (data) => request('/sys/share/dynamic/detail', {
	method: 'get',
	data
})
export const getProductDetails = (data) => request('/sys/share/product/detail', {
	method: 'get',
	data
})
export const agreementPrivacy = () => request('/sys/share/agreement/privacy', {
	method: 'get'
})

export const conferenceList = (data) => request('/recruit/plat/conference/list', {
	method: 'get',
	data
})
// 分页查询本无签会议信息
export const conferencePage = (data) => request('/recruit/app/conference/conferencePage', {
	method: 'get',
	header: {
		plat: 4
	},
	data
})
// 会议 - 活动时间标记
export const conferenceTime = (data) => request('/recruit/app/conference/conferenceTime', {
	method: 'get',
	header: {
		plat: 4
	},
	data
})

// 分页查询 企业 本无签会议信息 
export const conferencePageForOrg = (data) => request('/recruit/app/conference/pageForOrg', {
	method: 'get',
	data
})
// 会议报名  添加 
export const conferenceApply = (data) => request('/recruit/app/conference/apply', {
	method: 'post',
	data
})
// 会议 - 详情（用户）
export const conferenceGetByConferenceId = (data) => request('/recruit/app/conference/getByConferenceId', {
	method: 'get',
	data,
	header: {
		plat: 4
	},
	loadingText:'加载中...',
	
})

// 一键生成圈子
export const conferenceCreateCircle = (data) => request('/recruit/app/conference/createCircle', {
	method: 'post',
	data
})
// 会议 - 应生成圈子信息
export const conferenceCircleName = (data) => request('/recruit/app/conference/circleName', {
	method: 'get',
	data
})
// 会议 - 查询已生成的圈子信息
export const conferenceCircles = (data) => request('/recruit/app/conference/circles', {
	method: 'get',
	data
})
// 常见问题 - 列表
export const questionAll = (data) => request('/sys/question/all', {
	method: 'get',
	header: {
		plat: 4
	},
	data
})

// 签到二维码
export const conferenceGenQrCode = (data) => request('/recruit/app/conference/sign/genQrCode', {
	method: 'get',
	data
})
// 签到 -- 扫码
export const conferenceSignScan = (data) => request('/recruit/app/conference/sign/scan', {
	method: 'get',
	data
})

// 签到
export const conferenceSign = (data) => request('/recruit/app/conference/sign', {
	method: 'post',
	data
})
// 直接签到
export const conferenceSignDirectSign = (data) => request('/recruit/app/conference/directSign', {
	method: 'post',
	data
})

// 签到详情
export const conferenceSigneDetail = (data) => request('/recruit/app/conference/sign/detail', {
	method: 'get',
	data
})
// 报名/签到 - 导出Excel 
export const conferenceApplyExport = (data) => request({
	url: '/recruit/plat/conference/apply/export',
	method: 'post',
	data
})
// 会议删除 
export const conferenceDelete = (data) => request(`/recruit/app/conference/delete/${data.conferenceId}`, {
	method: 'delete',
})
// 直引、裂变数量查询
export const getRegisterConnectCount = (data) => request(`/member/register/connectCount`, {
	method: 'get',
	data,
	loadingText:'加载中...'
})
// 当前用户-直引/裂变列表分页查询
export const getRegisterConnectMemberPage = (data) => request(`/member/register/connectMemberPage`, {
	method: 'get',
	data,
	loadingText:'加载中...'
})

// 企业查询本无签会议详情 /recruit/app/conference/detailForOrg/{conferenceId}
export const conferenceDetailForOrg = (data) => request(`/recruit/app/conference/detailForOrg/${data.conferenceId}`, {
	header: {
		plat: 4
	},
})
// 问小无
export const getAipAi = (data) => request('/aip/aip-anon/ai', {
	method: 'post',
	data
})
export const getNetwork2 = (data) => {
	// jiami, jiemi rsaPublicData, rsaPrivateData,
	return request({
		url: '/member/network/encrypt/graph',
		method: 'post',
		data: {
			memberId: rsaPublicData(data.id) // data.id // rsaPublicData(data.id)
		},
		header: {
			Authorization: 'Bearer ' + data.token
		}
	})
}

// 获取点播视频列表 
export const circleVideoList = (data) => request(`/circle/circle-dynamic/vodInfo/list`, {
	header: {
		plat: 4
	},
	data
})

// 热文类目 - 列表
export const hotCategory = () => request(`/recruit/hotText/category-list`)


// 热文 - 详情  
export const hotTextDetail = (data) => request(`/recruit/hotText/detail`, {
	header: {
		plat: 4
	},
	data
})
// 热文 - 详情  
export const hotTextDetailHtml = (data) => request(`/recruit/hotText/detail/html`, {
	header: {
		plat: 4
	},
	data
})
// 热文 - 分页查询 
export const hotList = (data) => request(`/recruit/hotText/list`, {
	header: {
		plat: 4
	},
	method: 'post',
	data
})
// 热文 - 用户引用 
export const hotQuote = (data) => request(`/recruit/hotText/quote`, {
	header: {
		plat: 4
	},
	method: 'post',
	data
})
// 热文 - 用户引用详情 
export const hotQuoteDetail = (data) => request(`/recruit/hotText/quote-detail`, {
	header: {
		plat: 4
	},
	data
})
// 热文 - 用户引用列表  
export const hotQuoteList = (data) => request(`/recruit/hotText/quote-list`, {
	header: {
		plat: 4
	},
	method: 'post',
	data
})
// 热文 - 引用人信息 
export const hotQuoteUser = (data) => request(`/recruit/hotText/quote-members`, {
	header: {
		plat: 4
	},
	method: 'post',
	data
})
// 热文 - 用户删除引用热文 
export const hotQuoteDel = (data) => request(`/recruit/hotText/delete`, {
	data
})
// 热文 - 采集热文 
export const hotTextUrl = (data) => request(`/recruit/plat/hotText/url`, {
	data
})
// 热文 - 用户发布文章
export const hotTextPublish = (data) => request(`/recruit/hotText/publishArticle`, {
	method: 'post',
	data
})
// 获取邀约模板
export const conferenceTemplate = (data) => request(`/recruit/app/conference/template`, {
	method: 'get',
	data
})

// 生成邀请函
export const createInvitation = (data) => request(`/recruit/app/conference/createInvitation`, {
	method: 'post',
	data
})